//处理权限树数据的方法
const getTereData = (menus) => {
  let arr = [];
  menus.forEach((item) => {
    let obj = {};
    if (item.children) {
      obj = {
        value: item.keyid,
        title: item.label,
        children: getTereData(item.children),
      };
    } else {
      obj = { value: item.keyid, title: item.label };
    }
    arr.push(obj);
  });
  return arr;
};
export default getTereData;
